import constants from '@/commons/constants';
const moduleCode = constants.MODULE_MALL_CODE;

export default [
    {
        path: '/order',
        redirect: '/order/freight'
    },
    {
        path: '/order/freight',
        component: () => import('@/views/mall/order/freight/index.vue'),
        meta: {
            title: '运费模板'
        }
    },
    {
        path: '/order/list',
        name: 'orderList',
        component: () => import('@/views/mall/order/orderList/index.vue'),
        meta: {
            title: '订单列表'
        }
    },
    {
        path: '/order/list/detail',
        component: () => import('@/views/mall/order/orderDetail/index.vue'),
        meta: {
            title: '订单详情'
        }
    },
    {
        path: '/order/refund',
        name: 'orderRefundList',
        component: () => import('@/views/mall/order/refundList/index.vue'),
        meta: {
            title: '售后订单'
        }
    },
    {
        path: '/order/refund/detail',
        component: () => import('@/views/mall/order/refundDetail/index.vue'),
        meta: {
            permAuth: false,
            moduleCode,
            title: '售后详情'
        }
    },
    {
        path: '/order/delivery',
        name: 'orderDelivery',
        component: () => import('@/views/mall/order/delivery/index.vue'),
        meta: {
            title: '配送管理',
            code: 'delivery_management',
            permAuth: true,
            keepAlive: true,
            moduleCode
        }
    },
    {
        path: '/order/delivery/templateAdd',
        component: () => import('@/views/mall/order/delivery/fast/template/add.vue'),
        meta: {
            title: '新增运费模板',
            permAuth: false,
            moduleCode
        }
    },
    {
        path: '/order/delivery/templateEdit',
        component: () => import('@/views/mall/order/delivery/fast/template/add.vue'),
        meta: {
            title: '修改运费模板',
            permAuth: false,
            moduleCode
        }
    },
    {
        path: '/order/delivery/doorAdd',
        component: () => import('@/views/mall/order/delivery/door/add.vue'),
        meta: {
            title: '新增自提地址',
            permAuth: false,
            moduleCode
        }
    },
    {
        path: '/order/delivery/doorEdit',
        component: () => import('@/views/mall/order/delivery/door/add.vue'),
        meta: {
            title: '修改自提地址',
            permAuth: false,
            moduleCode
        }
    }
];
